package solution7;

import java.util.Scanner;

public class Main {
    public static void main(String[] agrs) {
        Scanner scanner = new Scanner(System.in);
        Solution solution = new Solution();
//        System.out.println(Integer.MAX_VALUE);// 0x7fffffff
//        System.out.println(Integer.MIN_VALUE);//0x80000000

        while (scanner.hasNext()) {
            int x = scanner.nextInt();
            System.out.println(solution.reverse(x));
        }
    }
}
